home *** CD-ROM | disk | FTP | other *** search
- #ifndef _SIRGS_H
- #define _SIRGS_H
-
- #ifndef CONST
- # define CONST const
- #endif
-
- #define RGS_ID "RGSLIB"
- #define RGS_VERSION 0x0101
- #define RGS_EDITION 0x0000
-
- typedef struct /* ライブラリ環境 */
- {
- void *(*malloc)(size_t);
- void (*free)(void *);
- char *path; /* 検索パス */
- } RGSCFG_T;
-
- typedef struct _rgsdat_t
- {
- struct _rgsdat_t *next;
- unsigned short att;
- unsigned short stt;
- int link; /* リンクレベル */
- char *name;
- void *ptr;
- } RGSDAT_T;
-
- typedef struct _rgsfnc_t
- {
- struct _rgsfnc_t *next;
- unsigned short att;
- unsigned short stt;
- int link; /* リンクレベル */
- char *name;
- int (*func)();
- } RGSFNC_T;
-
- typedef struct _rgspara_t
- {
- char id[8];
- short version;
- short edition;
-
- int (*funcEntry)(struct _rgspara_t *);
- int (*funcTerm )(struct _rgspara_t *);
- int (*funcMain )(int,char **);
- int (*funcExec )();
-
- RGSDAT_T *(*RGS_datGet )(CONST char *);
- int (*RGS_datSet )(CONST char *, void *);
- int (*RGS_datUnset )(CONST char *);
- int (*RGS_datLink )(CONST char *);
- int (*RGS_datUnlink)(CONST char *);
- RGSFNC_T *(*RGS_fncGet )(CONST char *);
- int (*RGS_fncSet )(CONST char *, int (*func)());
- int (*RGS_fncUnset )(CONST char *);
- int (*RGS_fncLink )(CONST char *);
- int (*RGS_fncUnlink)(CONST char *);
- } RGSPARA_T;
-
- extern RGSCFG_T RgsCfg;
-
- extern RGSDAT_T *RGS_datGet( CONST char *name );
- extern int RGS_datSet( CONST char *name, void *ptr );
- extern int RGS_datUnset( CONST char *name );
- extern int RGS_datLink( CONST char *name );
- extern int RGS_datUnlink( CONST char *name );
-
- extern RGSFNC_T *RGS_fncGet( CONST char *name );
- extern int RGS_fncSet( CONST char *name, int (*func)() );
- extern int RGS_fncUnset( CONST char *name );
- extern int RGS_fncLink( CONST char *name );
- extern int RGS_fncUnlink( CONST char *name );
-
- extern RGSPARA_T *RGS_paraAlloc(void *entry);
- extern void RGS_paraFree( RGSPARA_T *rgspara );
-
- extern int RGS_setSearchPath( CONST char *path );
- extern int RGS_load(CONST char *fn, char **ptr, char **entry);
-
- #endif
-